
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <title>ECMAScript 6入门</title>
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
  
</head>
<body>
  <script src="https://google.github.io/traceur-compiler/bin/traceur.js"></script>
<script src="https://google.github.io/traceur-compiler/bin/BrowserSystem.js"></script>
<script src="https://google.github.io/traceur-compiler/src/bootstrap.js"></script>
 

<!-- <script type="module">
  class Calc {
    constructor() {
      console.log('Calc constructor');
    }
    add(a, b, c) {
      return a + b+c;
    }
  }

  var c = new Calc();
  console.log(c.add(4,5,1));
</script> -->
<script>
$traceurRuntime.ModuleStore.getAnonymousModule(function() {
  "use strict";

  var Calc = function Calc() {
    console.log('Calc constructor');
  };

  ($traceurRuntime.createClass)(Calc, {add: function(a, b) {
    return a + b;
  }}, {});

  var c = new Calc();
  console.log(c.add(4, 5));
  return {};
});
</script>
</body>
</html>
